﻿/*
* DataManager.h
*
* 数据管理
*
* create date: 2014.4.21
* create by: leo
*
*/

#ifndef _DATAMANAGER_H_
#define _DATAMANAGER_H_

#include "cocos2d.h"
#include "../Common.h"

class CDataManager
{
public:
	static CDataManager& getInstance();

public:
	void registerProvider(const char* name, CDataProvider& provider);
	CDataProvider* getProvider(const char* name);

protected:
	CDataManager();
	virtual ~CDataManager();

	virtual bool initWithFile(const char* filePath);

protected:
	cocos2d::CCDictionary mProvDict;
	static CDataManager* Instance;
};

#endif // _DATAMANAGER_H_
